﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="exam.aspx.cs" Inherits="manager_user" ValidateRequest="false" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Exam</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />    
    <link rel="stylesheet" type="text/css" href="../css/manager.css"/>
</head>
<body>
    <form runat="server" style="padding:10px">
        <div id="layout_infor" runat="server">
            
            <table border="0" width="100%">
                <tr>
                    <td>
                        <asp:Label ID="lbl_examcode" runat="server" Text="" style="font-size:18px"></asp:Label>
                        <asp:HiddenField ID="hdf_value" runat="server" />
                        <div style="padding-bottom:10px;color:#F00">Type check, additional questions on the exam.</div>            
                    </td>
                    <td align="right">
                        <asp:Button ID="btn_back" class="btnWhite" runat="server" Text="Back" 
                            onclick="btn_back_Click" />
                    </td>
                </tr>
            </table>
            <div style="text-align:center;color:#F00">
                <asp:Label ID="lbl_add_ques" runat="server" Text=""></asp:Label>
            </div>
                        <asp:GridView ID="mGridView_ViewQuestion" style="border:1px solid #a9a9a9" runat="server" 
                            Width="100%" AutoGenerateColumns="False" BackColor="White" BorderColor="Black" 
                            BorderStyle="None" BorderWidth="1px" CellPadding="5" >
                            <FooterStyle BackColor="White" ForeColor="#000066" />
                            <Columns>
                                <asp:BoundField DataField="Number" HeaderText="Number" >                        
                                    <ItemStyle HorizontalAlign="Center" Width="50px" />
                                </asp:BoundField>
                                <asp:BoundField DataField="QuesCode" HeaderText="QuesCode" >                        
                                    <ItemStyle HorizontalAlign="Center" Width="150px" />
                                </asp:BoundField>
                                <asp:TemplateField HeaderText="Content">
                                    <ItemTemplate>
                                        <%#Eval("Content") %>
                                    </ItemTemplate>                                    
                                </asp:TemplateField>
                                <asp:BoundField DataField="Answer" HeaderText="Answer" >                        
                                    <ItemStyle HorizontalAlign="Center" Width="80px" />
                                </asp:BoundField>
                            </Columns>
                            <RowStyle ForeColor="#000066" />
                            <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                            <HeaderStyle BackColor="#05ADEE" Font-Bold="True" ForeColor="White" />
                        </asp:GridView>
                        
            <div style="padding:5px 0 5px 0">
            </div>            
        </div>
        <div id="layout_gridview" runat="server">
            <table border="0" style="width:100%">
                <tr>
                    <td width="420" valign="top" style="font-size:18px">
                    
                        <div style="padding-bottom:10px">Exam Code</div>
                        <div><asp:TextBox ID="txt_examcode" class="input_text_view" runat="server" MaxLength="10"></asp:TextBox></div>
                        
                        <div style="padding:10px 0 10px 0">Exam Type</div>
                        <div class="input_text_view">
                            <asp:DropDownList ID="ddl_type" runat="server" style="border:0;font-size:18px;width:387px;margin-top:2px;padding:10px 0 8px 0">
                                <asp:ListItem>-- Select once --</asp:ListItem>
                                <asp:ListItem>General Knowledge</asp:ListItem>
                                <asp:ListItem>Mathematics</asp:ListItem>
                                <asp:ListItem>Computer Technology</asp:ListItem>
                            </asp:DropDownList>
                        </div>
                        <div style="padding:10px 0 10px 0">
                            <asp:Button ID="btn_add" class="btnGreen" runat="server" Text="Add" onclick="btn_add_Click" />
                        </div>
                        <div style="font-size:15px;color:#F00;padding-top:10px"><b><asp:Label ID="lbl_msg" runat="server" Text=""></asp:Label></b></div>
                    </td>
                    <td valign="top">
                        <div style="padding:0 0 10px 0">
                            <asp:Button ID="btn_del" class="btnRed" runat="server" Text="Delete" 
                                onclick="btn_del_Click" />
                            <asp:Button ID="btn_refresh" class="btnWhite" runat="server" Text="Refresh" onclick="btn_refresh_Click" />
                        </div>
                        <asp:GridView ID="mGridView" style="border:1px solid #a9a9a9" runat="server" 
                            Width="100%" AutoGenerateColumns="False" BackColor="White" BorderColor="Black" 
                            BorderStyle="None" BorderWidth="1px" CellPadding="5" AllowPaging="True" 
                            AllowSorting="True" PageSize="15" onpageindexchanging="mGridView_PageIndexChanging"
                            onselectedindexchanged="mGridView_SelectedIndexChanged">
                            <FooterStyle BackColor="White" ForeColor="#000066" />
                            <Columns>
                                <asp:TemplateField HeaderText="Select">
                                    <ItemTemplate>
                                        <input type="checkbox" id="chk" runat="server" value='<%#Eval("examCode") %>' />
                                    </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" Width="50px" />
                                </asp:TemplateField>
                                <asp:BoundField DataField="examCode" HeaderText="Exam Code" >                        
                                </asp:BoundField>
                                <asp:BoundField DataField="type" HeaderText="Exam Type" >                        
                                </asp:BoundField>
                                <asp:CommandField HeaderText="View Question" SelectText="View" 
                                    ShowSelectButton="True">
                                    <ItemStyle HorizontalAlign="Center" Width="70px" />
                                </asp:CommandField>
                            </Columns>
                            <RowStyle ForeColor="#000066" />
                            <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                            <HeaderStyle BackColor="#05ADEE" Font-Bold="True" ForeColor="White" />
                        </asp:GridView>
                        
                    </td>
                </tr>
            </table>
        </div>
    </form>
</body>
</html>
